﻿using System;
using System.Text;

namespace Notepad_X.Classes {
    public interface IDocument {

         int id { get; }
         Notepad_X.Components.TabPageX tab_page { get; }
         string path { get; }

         bool saved { get; }
         bool available { get; }

         event DocumentXEventHandler DocumentChanged;
         System.IO.FileSystemWatcher watcher { get; set; }
         bool watcherChanged { get; set; }
         object text_box { get; }
         System.Drawing.Printing.PrintDocument printDocument{get;}

         string text { get; set; }
         System.Drawing.Font font{ get; set;}
         void clear();
         void create(int pId);

         void setColors(System.Drawing.Color Background, System.Drawing.Color Fore);

         void save(string pPath);
         void open(string pPath);

         void cut();
         void copy();
         void paste();
         void selectAll();

         string selectedText();
         void insert(int index, string text);
         int selectionIndex();

         void undo();
         void redo();

         void print();

         void lineNumbers(bool value);

         void goTo(int line);

         void find(string text);
         void replace(string text, string newText);

         int find_pos {get;set;}
         int find_index { get; set; }
         string find_string { get; set; }
    }
    public delegate void DocumentXEventHandler(object sender, DocumentXEventArgs e);

    public class DocumentXEventArgs : EventArgs {
        public int id;
        public DocumentXEventArgs(int _id) { id = _id; }
    }
}
